package org.example.service;

import org.example.entity.Car;
import org.example.mapper.CarMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CarServiceImpl implements CarService {
    @Autowired
    private CarMapper carMapper;

    @Override
    public int add(Car car) {
        return carMapper.add(car);
    }

    @Override
    public int del(int carId) {
        return carMapper.del(carId);
    }

    @Override
    public int update(Car car) {
        return carMapper.update(car);
    }

    @Override
    public Car get(int carId) {
        return carMapper.get(carId);
    }

    @Override
    public List<Car> getList() {
        return carMapper.getList();
    }
}
